home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / fltnclok / smalclok.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-05-08  |  2.3 KB  |  63 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    AutoRedraw      =   -1  'True
  4.    BorderStyle     =   0  'None
  5.    ClientHeight    =   195
  6.    ClientLeft      =   3885
  7.    ClientTop       =   3585
  8.    ClientWidth     =   945
  9.    ClipControls    =   0   'False
  10.    ControlBox      =   0   'False
  11.    FillStyle       =   0  'Solid
  12.    Height          =   600
  13.    Icon            =   SMALCLOK.FRX:0000
  14.    KeyPreview      =   -1  'True
  15.    Left            =   3825
  16.    LinkTopic       =   "Form1"
  17.    MaxButton       =   0   'False
  18.    MinButton       =   0   'False
  19.    ScaleHeight     =   195
  20.    ScaleWidth      =   945
  21.    Top             =   3240
  22.    Width           =   1065
  23.    Begin Timer Timer1 
  24.       Left            =   240
  25.       Top             =   480
  26.    End
  27.    Begin Label Label1 
  28.       Alignment       =   2  'Center
  29.       BackColor       =   &H00C0C0C0&
  30.       BorderStyle     =   1  'Fixed Single
  31.       Height          =   225
  32.       Left            =   0
  33.       TabIndex        =   0
  34.       Top             =   0
  35.       Width           =   975
  36.    End
  37. Declare Function SetWindowPos Lib "User" (ByVal h%, ByVal hb%, ByVal X%, ByVal Y%, ByVal cx%, ByVal cy%, ByVal f%) As Integer
  38. Const SWP_NOMOVE = 2
  39. Const SWP_NOSIZE = 1
  40. Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
  41. Const HWND_TOPMOST = -1
  42. Const HWND_NOTOPMOST = -2
  43. Dim DeltaX, DeltaY As Integer   ' Declare variables.
  44. Sub Form_Load ()
  45. Dim Success As Integer
  46.     Success% = SetWindowPos%(Form1.hWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
  47. '>>>>If you want to set it back to NoTopMost, then just change the argument to HWND_NOTOPMOST<<<<
  48. '>>>>Visual Basic 3.0 has a bug that causes the app to lose topmost when it is minimized, to overcome that, simply call the function within the Form_Resize procedure, but use the argument 1 instaed of FLAGS or else
  49. 'when you resize the form, the form will be positioned at the 0, 0 coordinate that you'd specified in the argument above.<<<<
  50.     Form1.Top = Screen.Height - Form1.Height
  51.     Form1.Left = Screen.Width - Form1.Width
  52.     timer1.Interval = 150  ' Set Interval.
  53. End Sub
  54. Sub Label1_DblClick ()
  55. about.Show
  56. End Sub
  57. Sub Label1_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  58. 'about.Show
  59. End Sub
  60. Sub Timer1_Timer ()
  61.    Label1.Caption = Time   ' Update time display
  62. End Sub
  63.